<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="../org/angular.min.js"></script>
</head>
<body>
<div ng-app="hd" ng-controller="ctrl">
    <table border="1" width="500">
        <tr>
            <td>
                <!-- checkbox被点击会在$scope创建布尔值 -->
                <input type="checkbox" ng-model="all">
                <!-- 同步布尔值设置显示文本 -->
                <span ng-bind="all?'取消':'全选'"></span>
            </td>
            <td>标题</td>
            <td>网址</td>
        </tr>
        <tr ng-repeat="v in data">
            <td>
                <input type="checkbox" ng-checked="all">
            </td>
            <td>{{v.name}}</td>
            <td>{{v.url}}</td>
        </tr>
    </table>
</div>
<script>
    var m = angular.module('hd', []);
    m.controller('ctrl', ['$scope', function ($scope) {
        $scope.data = [
            {name: '后盾人', 'url': 'houdunren.com'},
            {name: '向军', 'url': 'houdunwang.com'},
        ];
    }]);
</script>
</body>
</html>